﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
using System.Windows.Forms;

namespace elevator
{
    class Person
    {
        int id;
        int originFloor;
        string destinationFloor;
        double weight; 

        Label details = new Label(); 

        Image img = Properties.Resources.man2;

        public Person(int id_num, int enteringFloor, string destination)
        {
            id = id_num;
            originFloor = enteringFloor;
            destinationFloor = destination;
            calcRandomWeight(); 
            details.Text = "ID:" + id + "\nDF:" + destinationFloor;
        }

        private void calcRandomWeight()
        {
            Random random = new Random();
            int w = random.Next(0, 9);
            if (w == 0)
            {
                weight = 52.60; 
            }
            else if (w == 1)
            {
                weight = 60.25; 
            }
            else if (w == 2)
            {
                weight = 69.8; 
            }
            else if (w == 3)
            {
                weight = 75.01; 
            }
            else if (w == 4)
            {
                weight = 81.95; 
            }
            else if (w == 5)
            {
                weight = 87.00; 
            }
            else if (w == 6)
            {
                weight = 92.40;
            }
            else if (w == 7)
            {
                weight = 100.05; 
            }
            else if (w == 8)
            {
                weight = 105.67; 
            }
        
        }

        public double getWeight()
        {
            return weight; 
        }

        public Image getImage()
        {
            return img;
        }

        public string getLabel()
        {
            return details.Text;
        }

        public string getDestinationFloor()
        {
            return destinationFloor;
        }
    }
}
